#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

BUILD_PACKAGE_BOOL=False

AC_PREREQ(2.61)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CONFIG_SRCDIR([include/hsrb_eval.h])

# Checks for programs.
AC_PROG_CC

# Checks for libraries.
AC_SEARCH_LIBS(ruby_init,[ruby1.8],HSRB_LIBS="-lruby1.8",[AC_MSG_ERROR(nothing defines ruby1.8)])

AC_HAVE_LIBRARY(m,HSRB_LIBS="$HSRB_LIBS -lm",[AC_MSG_ERROR(nothing defines m)])

AC_HAVE_LIBRARY(crypt,HSRB_LIBS="$HSRB_LIBS -lcrypt",[AC_MSG_ERROR(nothing defines crypt)])

# Checks for header files.
RUBY_ARC_DIR=`ruby -e 'require "rbconfig.rb"; puts Config::expand("\$(archdir)")'`

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.
BUILD_PACKAGE_BOOL=True
AC_SUBST([BUILD_PACKAGE_BOOL])
AC_SUBST([HSRB_LIBS])
AC_SUBST([RUBY_ARC_DIR])

AC_CONFIG_FILES([Hsrb.buildinfo])
AC_OUTPUT
